package com.doctcloud.datacloud.job;

import com.doctcloud.datacloud.entity.DeptDictEntity;
import com.doctcloud.datacloud.service.DeptDictEntityService;
import com.doctcloud.datacloud.task.ZipExport;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

import static com.doctcloud.common.core.utils.DateUtils.getTime;

/**
 * @author :  doctCloud samula
 * @date :  2025/11/25
 * @Descript :
 */
@Component
@Slf4j
public class ZipJob {
    @Resource
    private ZipExport zipExport;
    @XxlJob(value = "ZipJobHandler",init = "init",destroy = "destory")
    public ReturnT<String> execute(){

        zipExport.ZipTrans();

        return ReturnT.SUCCESS;
    }
    private void init(){
        log.info("科室同步调用成功,同步开始：" + getTime());
    }
    private void destory(){
        log.info("科室同步注销成功,同步结束：" + getTime());
    }
}
